home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 March - Disc 1 / Macworld (1999-03) (Disk 1).dmg / Shareware World / Utilities / Text Processing / Alpha / Help / Bug Reports and Debugging < prev    next >
Encoding:
Text File  |  1998-12-19  |  24.7 KB  |  605 lines  |  [TEXT/ALFA]

  1. ================================================================================
  2.  
  3.           Bugs and Bug-reports
  4.  
  5. Please send details of any problems you have with any packages or with Alpha 
  6. itself to the person responsible, or enquire on the Alpha-D mailing list.  
  7. Perhaps someone there will be able to help you out.  Serious bugs which, for 
  8. example, crash Alpha can probably only be fixed by Pete Keleher, but other 
  9. bugs may be Tcl code bugs, and can be fixed more quickly and easily.  
  10. Without a 'Stack Trace' it is ALMOST ALWAYS NOT POSSIBLE to track down 
  11. problems in Alpha's Tcl code, unless they lead to very 'visual' problems.
  12.  
  13. The help below tells you how to get a stack trace under the most 
  14. general circumstances.  One quick trick you may try is the following.  
  15. Open a Tcl shell (cmd-Y in the file menu) and then repeat the action 
  16. which caused the problem.  Some internal problems are trapped by Alpha 
  17. and errors dumped to the shell window if it's open.  If you're lucky, 
  18. your bug is trapped like that you'll have the trace to report 
  19. automatically.
  20.  
  21.            Stack-traces
  22.  
  23. It would be helpful to have a stack-trace if a command is obviously doing
  24. the wrong thing/failing with an error.  To do this, hit cmd-Y to pull up 
  25. the Tcl shell, and select 'Trace Tcl Proc…' from the menu.  Select the
  26. procedure you need to trace (or ask me which one to trace), and go back to 
  27. where you were to repeat the action which caused the problem.  Now hit 
  28. cmd-Y again, and then select 'Dump Traces' and mail me the resulting window
  29. which is opened.  
  30.  
  31. With some errors it may be worth rebuilding your Tcl indices and then 
  32. quitting and restarting Alpha (use the Tcl menu to do that).
  33.  
  34. Please include the version numbers of Alpha and other packages which you are 
  35. using.  If they are not the latest you should consider upgrading first too.
  36.  
  37.            What procedure to trace?
  38.  
  39. If a menu-selection causes a problem, then it is pretty clear what to
  40. trace, but if it was a key-press it is less clear.
  41.         
  42. Often you won't know which procedure you should trace.  However if the 
  43. problem occurs with a key-press (say you press 'return' and the wrong thing 
  44. happens), then you can find out which procedure is being activated with the 
  45. 'Describe Binding (F7)' menu item: hit F7, followed by the offending 
  46. key-press.  Alpha will give you the name of the procedure which would be 
  47. triggered by that key.  Now setup a trace on that procedure as detailed in 
  48. the preceding paragraph.
  49.  
  50.            Using Trace-func
  51.  
  52. 5.0 introduces the Tcl function-tracing command 'traceFunc'. traceFunc 
  53. allows you to trace a specfic function whenever it is called, sending the 
  54. output to another window. The indented trace of the function includes all 
  55. parameters, each argument enclosed within single quotes, as well as the 
  56. function result. 
  57.  
  58. The syntax of the function is:
  59.  
  60.     traceFunc on <funcName> <winName>
  61.     traceFunc off
  62.     traceFunc status
  63.  
  64. For example, if I want to trace the proc 'nextFunc' (defined in 
  65. procs.tcl), the following might be a log of my activity at the Tcl shell:
  66.  
  67.     Welcome to Alpha's Tcl shell.
  68.     Alpha> traceFunc on nextFunc traceWin
  69.     Alpha> traceFunc status
  70.     Func-tracing on, func: nextFunc, win: traceWin
  71.     Alpha> 
  72.  
  73. Now I create a new window, "dirty" it so that I can get a save dialog, 
  74. and save it as 'traceWin'. Note that tracing is only sent to open 
  75. windows, so I must leave 'traceWin' open.
  76.  
  77. Then I open any random non-C file (because I want the function to fail), go 
  78. to the beginning of the file, and type escape-x 'nextFunc'.  The output 
  79. should look something like the following:
  80.  
  81.     nextFunc 
  82.      searchFunc '1' 
  83.       getPos 
  84.       OK: 38530
  85.       select '38530' 
  86.       OK: 
  87.       saveVars 
  88.       OK: 
  89.       if '(1==1)' '
  90.             nextLine
  91.         ' 'else' '
  92.             previousLine
  93.         ' 
  94.        nextLine 
  95.        OK: 
  96.       OK: 
  97.       getPos 
  98.       OK: 38573
  99.       set 'pos' '38573' 
  100.       OK: 38573
  101.       setVar 'regExpr' '1' 
  102.       OK: 
  103.       setVar 'forward' '1' 
  104.       OK: 
  105.       setVar 'ignoreCase' '1' 
  106.       OK: 
  107.       search '^[^ \t\(#\r/@].*\(.*\)$' '38573' 
  108.       ERROR: Search unsuccessful
  109.      ERROR: Search unsuccessful
  110.     ERROR: Search unsuccessful
  111.  
  112.  
  113. The trace output shows that the problem was an unsuccessful search. In 
  114. this case, a dialog informed us of this fact anyway, but many Alpha 
  115. routines are not as friendly when it comes to error messages.
  116.  
  117.  
  118. Another way to debug Tcl routines is to insert statements that print 
  119. values to another window. For example, one could use the following 
  120. routine: 
  121.  
  122.     proc out args {
  123.         insertText -w "*tcl shell*" $args
  124.     }
  125.  
  126. Whatever you do, don't use 'puts stdout' or 'puts stderr' since these
  127. tend to crash Alpha (hopefully to be fixed at some point...)
  128.  
  129. ================================================================================
  130.  
  131.            Here's some debugging advice from Tom:
  132.  
  133. Hi All,
  134.  
  135. This is so simple that I hesitate to admit that I missed it this long, but
  136. I'll swallow my pride an mention this in case anyone  else has missed this.
  137.  
  138. When you want to get a handle on what a proc is doing, you can use a
  139. combination of the source in one window and the shell in another.
  140.  
  141. First, figure out what values the parameters of the proc would take on in
  142. the case you want to investigate, (perhaps from a trace while running
  143. things normally).
  144.  
  145. Now go to the shell and set variables with the same names as the parameters
  146. to the values you discovered through the trace.
  147.  
  148. Now go to the tcl source file and select a subset of the proc's internal 
  149. code and just load it.
  150.  
  151. After each sucessive part is run you can pop over to the shell and use it
  152. to check out the state of any variable with a simple set statement, or, 
  153. even easier, just cmd-dbl-click or a variable name you want to inspect the 
  154. value of.
  155.  
  156. I've found this real useful for investigating menu routines, you can change
  157. the menu creation string that the proc gave you and just select and reload
  158. it to see if your changes will do what you want.
  159.  
  160. Tom
  161.  
  162. ===============================================================================
  163.  
  164.           Known Bugs
  165.  
  166. (As of Alpha 7.1)
  167.  
  168. These are all bugs with Alpha's internal compiled code, _not_ with the 
  169. Tcl scripts which come with Alpha.  You will have to work around them 
  170. where possible.  
  171.  
  172. ()    Dead-key followed by delete removes several characters.
  173.  
  174. ()    under  MacOS 8, sometimes when Alpha is already running and you 
  175.     double click on a file in the finder to open Alpha, you can get
  176.     an error -917 (in the finder) and the file isn't opened.  I think
  177.     OS 8 sends a different aevent to an application of it is already
  178.     running, and this may be the problem.
  179.     
  180. ()    If I hit the key equivalent of a menu-item, it is called even if the
  181.     menu item has been disabled.  (This is a MacOS problem and will probably
  182.     never be fixed in Alpha)
  183.     
  184. ()    Multi-line edit boxes in dialogs should allow 'return' to be pressed,
  185.     without triggering the 'OK' button.  Otherwise there is no way to enter
  186.     a return.  (sure you can enter '\r' and have the calling procedure
  187.     manipulate the result, but that's not a good solution; also the above
  188.     is standard MacOS behaviour).
  189.     
  190. ()    gotoTMark often scrolls the window all the way to the top (0), 
  191.     before scrolling back to a TMark!  This gives the window a 
  192.     horrible up/down jerk motion when moving from one TMark to the 
  193.     next.
  194.  
  195. ()    'replaceText' on a large block of text which overlaps the top of 
  196.     the window (i.e.  half a big paragraph is off the top of the 
  197.     window, half is still visible, and we now replace the paragraph 
  198.     with some different text) causes a re-draw error in which the 
  199.     replacement text is all drawn in the window (from the top down) 
  200.     when only some of it should be visible.  This gives the illusion of 
  201.     over-writing other stuff in the window.  All is ok if you scroll up 
  202.     and down to refresh.
  203.  
  204.     This is most often manifested when using 'fillParagraph' on a large 
  205.     paragraph which overlaps the top of the window.
  206.     
  207. ()    I tried out Adobe Type Reunion Deluxe 2.0 the other day, and it thinks 
  208.     the 'modes menu' towards the right end of the status bar is a font 
  209.     menu!  Most peculiar.
  210.  
  211. ()  Several people have reported these two problems, but not everyone
  212.     sees them:
  213.     
  214.     >Just a quick note...  I am using 7.0b2 on my 9500/132 and 8100/100AV.  On
  215.     >my 8100, the tear-off menus are chopped off on the right side when you tear
  216.     >them off to stand alone.  This happens on a friend's 8100/80 as well.
  217.     >
  218.     
  219.     I'm using Alpha 6.52 on a Starmax 4100 with 7.6.1 and Aaron and I
  220.     experience the same menu tear-off problem.  I also experienced it with 6.5
  221.     and 6.51 (I think).
  222.     
  223. ===============================================================================
  224.  
  225.           Pseudo-Bugs
  226.  
  227. These are things which Alpha perhaps ought to do, but doesn't and hence
  228. can be considered suggestions for the future or just bugs.
  229.  
  230. ()    There's no way to know which application it was which replied to an
  231.     event which was passed to 'handleReply'.
  232.     
  233. ()    The colours Alpha uses are incorrect for 'yellow' and 'cyan'.  You can
  234.     fix them if you want using 'config->redefine colors'.
  235.  
  236. ()    Have a flag to allow reporting of errors which hit the top level.  
  237.     Currently such errors just vanish and you're left wondering what exactly 
  238.     did/didn't happen.  I.e. the user should be able to define a 'errorHook'
  239.     procedure which is called with such top-level errors.  (This is 
  240.     effectively the 'bgerror' feature of Tcl 8)
  241.  
  242. ()    If you use 'killWindow' from within an 'openHook' proc, Alpha will
  243.     often crash (MacsBug tells you it's in 'rowColToPos' or some such proc).
  244.     There's no way to abort the open window from within that proc that
  245.     seems to be entirely safe.
  246.     
  247. ()    There is currently no facility to get a list of eventHandlers which 
  248.     have been defined.
  249.  
  250. ()    Extend 'matchIt' to cope with '/* ...  */' pairs as well as normal 
  251.     braces.
  252.  
  253. ()    Make 'quick find' and 'reverse quick find' more powerful as follows - 
  254.     'delete' removes one character from what's currently being found (and 
  255.     goes back to where that was found, so it's a kind of 'Undo' feature).  
  256.     Also clicking in the scrollbar, or anything which doesn't actually 
  257.     affect the window shouldn't reset the quick search which it currently 
  258.     does.  Both of these are features in Emacs which I miss in Alpha (as 
  259.     opposed to the other way round which is true of most things).
  260.  
  261. ()    Implement find/replace in the current selection (there is a proc 
  262.     to do this in "procs.tcl", but far more convenient would be a check box 
  263.     in the standard find dialog box).
  264.  
  265. ()    Move the replace-in-fileset facility to the standard find dialog as 
  266.     another option.  In fact why not combine this with the above 
  267.     suggestion and have a pop-up option menu with 'search this document' 
  268.     'search current selection' 'search entire fileset' as options, instead 
  269.     of the current 'multiple files' checkbox?  'Replace All' should replace 
  270.     all occurrences in the current selection/file, whilst for filesets this 
  271.     is rather drastic so I'd suggest there be another checkbox, which says 
  272.     'replace in all files' and changes the meaning of opt-cmd-R in that 
  273.     case.
  274.  
  275. ()    Let a window scroll at least so that the end of the document is 
  276.     half-way up the window?  Currently the last line of text must lie at 
  277.     the very bottom of the window and this is disconcerting when typing a 
  278.     long latex file (one can of course just add a whole bunch of returns, 
  279.     but that shouldn't be necessary).
  280.  
  281. ()    When Alpha's memory is low, put up a warning dialog that you should quit
  282.     and restart.
  283.     
  284. ()    'getModifiers' opened up some new possibilities for interface routines, 
  285.     however, in a couple of places where I would like to use this, things 
  286.     are done directly with alpha and there are no Tcl proc's that we can 
  287.     hang modifications off of.  Specifically, neither of the function 
  288.     pop-up's allow you to dectect if a modifier key was held down, (you 
  289.     could then offer a different menu, say the structual marks vs.  the 
  290.     alphabetical mark recently introduced via toTclMarkFile).  Once a menu 
  291.     is presented, there is no way to detect that a choice has been made 
  292.     with a modifier key depressed, this would be useful to provide an 
  293.     automatic mark stack push (such a mechanism does work in the status 
  294.     line <mode> pop-up, if an option key is held while selecting an item 
  295.     there, the help file (if any exists) for that mode will be opened.
  296.     
  297. ()    It would be nice if matchIt could put on a little bit more of a display so 
  298.     you are better able to pick it up with your peripheral vission as you are 
  299.     typing. Maybe "halo' the matchIt position before flashing the character, 
  300.     or form a cross of hilited char positions (above and below, both sides) 
  301.     before flashing the matchIt character.
  302.     
  303.     
  304.           Fixed but not released.
  305.  
  306. Things which have been fixed in Alpha 8.0 (release date unknown)
  307.  
  308. ()    If we have a menu item with a key-equivalent and a mark-charcter, 
  309.     like this: "!≠/=<Ineq", the 'item' sent to the menu proc is
  310.     not 'neq' as it should be, but rather '!≠neq'.  This is a bug.
  311.     
  312. ()    Cursor-key-bindings can't appear in menus.  More precisely the glyphs
  313.     for the arrow keys can appear, but the menu doesn't create the
  314.     appropriate binding for the keys, so the shortcut doesn't function.
  315.     A workaround is to define 'Bind ...' statements in addition to the
  316.     menu, but this is a bug.
  317.     
  318. ()  the GetTMarks list doesn't contain the duplicate window markers
  319.     <2>, <3> etc, as returned by [winNames -f].  This could be considered
  320.     a bug or a feature. 
  321.  
  322. ()    GetTMarks thinks non-file windows are in the '[pwd]' directory,
  323.     rather than in no directory at all.
  324.  
  325. ()    You can't make a menu with both menu-form-conversion and not, unless
  326.     you build it with 'addMenuItem ?-m?', but then you can't add dynamic
  327.     items or sub-menus.  What is needed is a code, like '&', to go in
  328.     the 'menu' command which says "don't convert this item".
  329.  
  330. ()  Error replies to 'dosc' are not always handled correctly:
  331.  
  332.         Welcome to Alpha's Tcl shell.
  333.         «Alpha ƒ» dosc -c 'WIsH' -s "file asfasf"
  334.         Error: Error: 1
  335.         «Alpha ƒ» dosc -c 'WIsH' -s "info asfasf"
  336.         Error: Error: bad option "asfasf": must be args, body, cmdcount, commands, 
  337.         complete, default, exists, globals, hostname, level, library, loaded, locals, 
  338.         nameofexecutable, patchlevel, procs, script, sharedlibextension, tclversion, 
  339.         or vars
  340.         «Alpha ƒ» 
  341.         
  342.     One might think this was a problem on 'WIsH's end of things, but 
  343.     if you replace the above by the equivalent 'AEBuild ...  misc dosc 
  344.     ...'  then it is clear the reply is correct.  Therefore Alpha is 
  345.     screwing up somewhere in 'dosc'. 
  346.  
  347. ()    The dialog command (i) fails when given a huge number of items in
  348.     more than 8 panes. (call 'global::allPrefs' to see this happen --
  349.     that's why the prefs have to be subdivided now). (ii) isn't
  350.     documented completely: '-n' option needs explaining.
  351.     
  352. ()    Also there's no command to disable an entire menu in one go.
  353.     
  354. ()    Furthermore, matchIt fails when matching the '{}' begin and end 'proc'
  355.     pair of a large function.  'balance' works still!  As a concrete
  356.     example, look at proc TeX::Completion::Cite.  matchIt has a built in 
  357.     default of 3000 char max to search.
  358.  
  359. ()    Let 'diff' work on files with Unix eol's as well as just mac ones 
  360.     (it 'works', but treats the entire file as a one line).
  361.  
  362. ()    'dialog' doesn't cope with _very_ complex multi-page dialogs
  363.  
  364. ()  Menu names can't be longer than 24 chars.  Can be problematic
  365.     for filesets menu.  Maximum is now 31 chars (max length of a file
  366.     in MacOS at present).
  367.  
  368. ()    The optional parameter to 'matchIt' doesn't seem to have any effect
  369.     for me.  E.g. the following two procs (when bound to a key) both can
  370.     take up to 10 seconds to return in a large (200k) file.  Presumably the
  371.     first is only supposed to search 200 characters so should be quick.
  372.  
  373.     proc matchFast {} {
  374.         if ![catch {matchIt ")" [lineStart [getPos]] 200} paren] {
  375.             alertnote "yes"
  376.         } else {    
  377.             alertnote "no"
  378.         }
  379.     }
  380.     proc matchSlow {} {
  381.         if ![catch {matchIt ")" [lineStart [getPos]]} paren] {
  382.             alertnote "yes"
  383.         } else {    
  384.             alertnote "no"
  385.         }
  386.     }
  387.  
  388. ()    The 'time' command reports ticks not microseconds.  Ticks aren't 
  389.     much use (too coarse-grained)
  390.  
  391. ()  The string returned from any 'dialog ....' edit box is not 
  392.     appended to the result correctly.  The result should be a list
  393.     of items, but I guess 'append' rather than 'lappend' is used
  394.     internally.  Example: if a dialog has an edit-item as the
  395.     first item, and I enter '} then {' (to search for obsolete Tcl 
  396.     syntax), the string returned by dialog '{res1 res2 ...}' is 
  397.     actually '{} then { res2 ...}' which is obviously completely
  398.     wrong.  It should have been {{\} then \{} res2 ...}.  Alpha
  399.     should be using 'lappend' internally which will do all the
  400.     hard work of quoting the result for you.  I think the same
  401.     problem occurs with many of Alpha's standard dialogs.
  402.     
  403. ()    the '-c' menu option to ignore all meta-characters also ignores all 
  404.     sub-menus (or rather it puts some weird character in the menu and 
  405.     there is no sub-menu).
  406.  
  407. ()  rememberPatternHook is called without quoting its arguments correctly
  408.     This means the call fails if either search of replace string contain
  409.     unquoted '{' or '}'.  (see bug a few lines up for probable solution) 
  410.  
  411. ()     Add commands/options: (Vince _really_ wants these!)
  412.  
  413.     'GetTMarks ?-w win?'
  414.     'replaceText ?-w win? ...'
  415.     'getPosOfTMark ?-w win? name'
  416.     
  417. ()  'matchIt "\]" $pos' never works --- the ']' argument to matchIt 
  418.     isn't handled correctly; the proc always returns 'no match found'
  419.  
  420. ()    Menu key bindings to items which contain square brackets '[]' do not
  421.     work.  This is because the binding is evaluated, which tries to
  422.     evaluate the '[xxx]'.  When creating the menu item, the text should
  423.     have been surrounded by '{}'.  This is most often manifested in the
  424.     window menu, for which keyboard equivalents cmd-0-9 do not work if
  425.     a window's name contains square brackets.
  426.     (There is a pseudo-workaround for this in the Tcl code).
  427.     Again this is probably a problem with append vs lappend used 
  428.     internally.
  429.  
  430. ()    removeTMark doesn't seem to work
  431.  
  432. ()    Almost none of Alpha's file/glob/cd/... commands support aliases
  433.     This would be fixed with Tcl8.0
  434.     
  435. ()    grep, scanfile etc. basically fail on Unix format files: they think
  436.     any match is on the first line of the file.  This is especially
  437.     useless for batch searches in which every match is listed as being
  438.     on the first line.  Upgrading to Tcl 8 should help this!
  439.     
  440. ()    icGetPref has some problems (other problems listed below too): 
  441.  
  442.     «Alpha ƒ» icGetPref Helper•http
  443.     lG1MacLynxphervigator™ 3.0
  444.  
  445. ()    icGetPref on many items returns 'ic err: -670' which is the following 
  446.     error:
  447.     
  448.         icTruncatedErr = -670,    /* more data was present than was returned */
  449.     
  450.     This happens for 'DownloadFolder' for example (_many_ others too).
  451.         
  452. ()    posToRowCol doesn't deal with tabs.  Is this a bug or a 
  453.     feature?  Basically on a line beginning with a tab, I'd expect 
  454.     [posToRowCol $start] to be "X 0", and [posToRowCol [incr 
  455.     start]] to be "X 4" (or "X 8" or whatever).  
  456.     
  457.     To put this another way, 'posToRowCol [getPos]' does not have the same
  458.     value as the row/col indicator in the status bar. 
  459.   
  460. ()  If you have an untitled dirty window which is not at the front, and then 
  461.     use 'Save all', you will get a save dialog for the window at the front, not 
  462.     the untitled one behind.
  463.  
  464. ()    'regModeKeywords' colorizes keywords without regard to capitalizations, there 
  465.     are plenty of languages where capitalization is significant, it would be 
  466.     nice to have a switch to tell alpha not to ignore keyword capitalization.
  467.     
  468. ()    Let 'scanfile' etc.  work on files with Unix eol's as well 
  469.     as just mac ones (they 'work', but treat the entire file as a 
  470.     single line, which isn't too helpful).  Also 'gets' treats an 
  471.     entire file as a single line if it's delimited by '\n'.  I guess
  472.     these issues would be resolved by updating Alpha's Tcl core to 7.6/8.0.
  473.  
  474. ()    Adjusting tab-size/font should not dirty the window.
  475.     (There is a work-around for this in "coreFixes.tcl")
  476.         
  477. ()    There are numerous problems (small and large) with Alpha's moveFile
  478.     removeFile etc.  These will go away if Alpha upgrades to Tcl8.0.
  479.     Here's an example: let's say we have files '$a' and '$b' and
  480.     we wish to replace $a with $b.  Then we can't do it.
  481.     
  482.     deleteFile $a ; moveFile $b $a   ;# gives 'unknown error'
  483.     moveFile $a ${a}~ ; moveFile $b $a ; deleteFile ${a}~  ;# gives error
  484.  
  485. ()     Make the 'listpick' box width & height user configurable?
  486.  
  487. ()    The following line exhibits a bug in the auto-wrap feature of 
  488.     Alpha.  It occurs with any long line which contains no internal
  489.     space but does contain punctuation/braces.  (This actually occurs
  490.     quite frequently in latex 'equation' environments).  Move the 
  491.     cursor to somewhere near the end of the line and start typing (make 
  492.     sure the window isn't read only).  Blank lines are inserted 
  493.     before the given line!    
  494.     
  495.     ,asbafsafaskasd.jsasassdkasdas,d{adasdadhja}skasddaasdasasasasasasasaasas
  496.     
  497. ()    'puts stderr blah' brings up a SIOUX window and crashes Alpha.  Alpha 
  498.     should be linked with the sioux-stubs, so no sioux-code is linked in,
  499.     and these puts commands should be diverted to some Tcl proc equivalent.
  500.     (the procedure tclLog in "library.tcl" is a good standard alternative)
  501.     Vince can supply you with some C code which will divert stdio to
  502.     given tcl procedures.
  503.  
  504. ()    bringToFront doesn't work on window names which contain colons 
  505.     (unusual case I know)
  506.  
  507. ()    There is no way to get or set the font or font-size of a window from Tcl
  508.  
  509. ()    If a file is opened with a selection (say everything: cmd-A), 
  510.     then closed, and then the data-fork of the file is changed, so 
  511.     that it is shorter, on re-opening the file, the highlighting is 
  512.     v.  odd, and I had to redraw the window to fix it (ctrl-l).  
  513.     Alpha should probably check if highlighting runs past the end of 
  514.     the file.
  515.  
  516. ()    The interaction of the search dialog box with the 'grepfset' procedure
  517.     is incorrect:
  518.  # 
  519.  # "grepfset" --
  520.  # 
  521.  #  args: wordmatch ?-nocase? expression fileset
  522.  #  Obviously we ignore wordmatch
  523.  #  
  524.  #  If the 'Grep' box was set, then the search item is _not_ quoted.
  525.  #  
  526.  #  Non grep searching problems:
  527.  #  
  528.  #  If it wasn't set, then some backslash quoting takes place. 
  529.  #  (The chars: \.+*[]$^ are all quoted)
  530.  #  Unfortunately, this latter case is done incorrectly, so most
  531.  #  non-grep searches which contain a grep-sensitive character fail.
  532.  #  The quoting should use the equivalent of the procedure 'quote::Regfind'
  533.  #  but it doesn't quote () and perhaps other important characters.
  534.  #  
  535.  #  Even worse, if the string contained any '{' it never reaches this
  536.  #  procedure (there must be an internal error due to bad quoting).
  537.  # 
  538.  
  539. ()   Some of them seem to be caused by Alpha not using 
  540.      'lappend' internally when it should be (it often seems to use 'append' 
  541.     together with some inadequate quoting instead).  This causes big 
  542.     problems when characters like '[]{}' are involved.
  543.  
  544. ()    Cmd-double-clicking seems first to check if there is a ':' anywhere in the
  545.     non-whitespace surrounding the click position, and if so sends that text
  546.     off to Internet Config.  Unfortunately if IC doesn't think it is a URL 
  547.     (often the case since, for instance, TeX labels and Tcl procedure names
  548.     may contain colons) the standard 'CmdDblClick' procedure is never called.
  549.     In such a case the cmd-dbl-click is just lost. One way around this is to 
  550.     double-click to get the selection you want, and then invoke the 
  551.     CmdDblClick routine via its keybinding (default = F6).
  552.  
  553. ()    searching backwards for this regexp in a window can lock Alpha up
  554.     or crash with error 28 (stack hits heap):
  555.  
  556.         (/\*([^*]|[^*]\/|\*[^\/]|\r)*\*/|^\[ \t\]\t*\$)
  557.  
  558.     Vince can supply a 100% reproducible example of this if needed.
  559.     Minor variants on this regexp have the same problem.  This occurs
  560.     when using text::genericIndent when editing javascript code in
  561.     HTML pages.  I'm not sure what the search is seeing that causes
  562.     the problem.  (text::genericIndent has since been rewritten to
  563.     avoid this trouble). (Will be fixed with new regexp code)
  564.  
  565. ()  'regexp {\w} a' == 1, but 'regexp {[\w]} a' == 0, i.e. the \w only
  566.     matches if it isn't inside a range!  There are many other regexp problems.
  567.     This isn't quite right: regexp {[\w]} a == 0 , but regexp {[\w]+} a == 1.
  568.     Very weird.  (Will be fixed with new regexp code)
  569.  
  570. ()  Regexp's still have some problems:
  571.  
  572.     «Alpha ƒ» regsub -all {\W} {aaaaaa  aa} {Z} t
  573.     14
  574.     «Alpha ƒ» set t
  575.     aaaaaaZZaaZZZtZZZZgæZZézZDZÇZC0Z
  576.     «Alpha ƒ» 
  577.     
  578.     This used to give:
  579.     
  580.     «Alpha ƒ» regsub -all {\W} {aaaaaa  aa} {Z} t
  581.     7
  582.     «Alpha ƒ» set t
  583.     aaaaaaZZaaZZZtZZZ
  584.     
  585.     which is also wrong.
  586.     (Will be fixed with new regexp code)
  587.  
  588.           Half-fixed:
  589.  
  590. ()    when dealing with a menu with more than perhaps 20 items, Alpha won't
  591.     unconvert the menu-item when it is sent to the menu-proc.  So if I
  592.     build a menu with 'Menu -n Name -p my_proc {lots of items... thisOne}'
  593.     then 'thisOne' appears in the menu as 'This One' (as desired), but
  594.     when it is selected, the call is 'my_proc Name "This One"' which
  595.     is incorrect.  The menu items near the top of the menu work fine!
  596.     
  597. ()    There are many other problems with long menus: 'enableMenuItem'
  598.     doesn't work properly. i.e. enableMenuItem $m thisOne 0 will
  599.     say there's no item with that name, and enableMenuItem $m "This One" 
  600.     0 will not complain, but won't actually disable the item either!
  601.     (Fix only applies with MacOS 8.5 or newer, and ought to work,
  602.     except it seems there's a mercutio problem which means things
  603.     still don't work!)
  604.  
  605.